package com.tjtt.tdm.flow.service.impl;

import java.io.IOException;
import java.util.List;
import java.util.Map;

import com.tjtt.tdm.base.PageResult;
import com.tjtt.tdm.exception.DaoException;
import com.tjtt.tdm.exception.ServiceException;
import com.tjtt.tdm.flow.bean.Flowtype;
import com.tjtt.tdm.flow.dao.IFlowtypeDao;
import com.tjtt.tdm.flow.service.IFlowtypeService;

public class FlowtypeServiceImpl implements IFlowtypeService{
	private IFlowtypeDao flowtypeDao;
 
	
	public IFlowtypeDao getFlowtypeDao() {
		return flowtypeDao;
	}

	public void setFlowtypeDao(IFlowtypeDao flowtypeDao) {
		this.flowtypeDao = flowtypeDao;
	}

	public int GetFlowtypeSize() throws DaoException
	{
		List list = flowtypeDao.findAllBySql("select ID,flowname,filename from flow_flowtype");
		return list.size();
	}

	public PageResult GetFlowtypeList(Map<String, String> filterMap) throws DaoException
	{
		return flowtypeDao.GetFlowtypeList(filterMap);
	}
	
	public void executeSQL(String sql) throws DaoException
	{
		flowtypeDao.executeBySql(sql);
	}
	
	public Flowtype GetFlowtypeById(Long id) throws DaoException
	{
		Flowtype entity = (Flowtype)flowtypeDao.findById(id);
		return entity;
	}
	
	public String save(Flowtype entity) throws DaoException
	{
		return flowtypeDao.save(entity);
	}
	
	public String saveobject(Object entity) throws DaoException
	{
		return flowtypeDao.saveobject(entity);
	}
	
	public void update(Flowtype entity) throws DaoException
	{
		flowtypeDao.update(entity);
	}
	
	public List findAllBySql(String strSql) throws DaoException
	{
		return flowtypeDao.findAllBySql(strSql);
	}

}
